Integrand size = 23, antiderivative size = 83 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {(a-3 b) x}{2 (a-b)^2}+\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{2 (a-b) d} \]
[Out]
Time = 0.11 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3756, 425, 536, 209, 211} \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} d (a-b)^2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d (a-b)}+\frac {x (a-3 b)}{2 (a-b)^2} \]
[In]
[Out]
Rule 209
Rule 211
Rule 425
Rule 536
Rule 3756
Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{\left (1+x^2\right )^2 \left (a+b x^2\right )} \, dx,x,\tan (c+d x)\right )}{d} \\ & = \frac {\cos (c+d x) \sin (c+d x)}{2 (a-b) d}-\frac {\text {Subst}\left (\int \frac {-a+2 b-b x^2}{\left (1+x^2\right ) \left (a+b x^2\right )} \, dx,x,\tan (c+d x)\right )}{2 (a-b) d} \\ & = \frac {\cos (c+d x) \sin (c+d x)}{2 (a-b) d}+\frac {(a-3 b) \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{2 (a-b)^2 d}+\frac {b^2 \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\tan (c+d x)\right )}{(a-b)^2 d} \\ & = \frac {(a-3 b) x}{2 (a-b)^2}+\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )}{\sqrt {a} (a-b)^2 d}+\frac {\cos (c+d x) \sin (c+d x)}{2 (a-b) d} \\ \end{align*}
Time = 0.68 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.94 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {4 b^{3/2} \arctan \left (\frac {\sqrt {b} \tan (c+d x)}{\sqrt {a}}\right )+\sqrt {a} (2 (a-3 b) (c+d x)+(a-b) \sin (2 (c+d x)))}{4 \sqrt {a} (a-b)^2 d} \]
[In]
[Out]
Time = 1.08 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.02
method | result | size |
derivativedivides | \(\frac {\frac {\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (d x +c \right )}{1+\tan \left (d x +c \right )^{2}}+\frac {\left (a -3 b \right ) \arctan \left (\tan \left (d x +c \right )\right )}{2}}{\left (a -b \right )^{2}}+\frac {b^{2} \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{\left (a -b \right )^{2} \sqrt {a b}}}{d}\) | \(85\) |
default | \(\frac {\frac {\frac {\left (\frac {a}{2}-\frac {b}{2}\right ) \tan \left (d x +c \right )}{1+\tan \left (d x +c \right )^{2}}+\frac {\left (a -3 b \right ) \arctan \left (\tan \left (d x +c \right )\right )}{2}}{\left (a -b \right )^{2}}+\frac {b^{2} \arctan \left (\frac {b \tan \left (d x +c \right )}{\sqrt {a b}}\right )}{\left (a -b \right )^{2} \sqrt {a b}}}{d}\) | \(85\) |
risch | \(\frac {x a}{2 \left (a -b \right )^{2}}-\frac {3 x b}{2 \left (a -b \right )^{2}}-\frac {i {\mathrm e}^{2 i \left (d x +c \right )}}{8 \left (a -b \right ) d}+\frac {i {\mathrm e}^{-2 i \left (d x +c \right )}}{8 \left (a -b \right ) d}+\frac {\sqrt {-a b}\, b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {2 i \sqrt {-a b}-a -b}{a -b}\right )}{2 a \left (a -b \right )^{2} d}-\frac {\sqrt {-a b}\, b \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+\frac {2 i \sqrt {-a b}+a +b}{a -b}\right )}{2 a \left (a -b \right )^{2} d}\) | \(179\) |
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 290, normalized size of antiderivative = 3.49 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\left [\frac {2 \, {\left (a - 3 \, b\right )} d x + 2 \, {\left (a - b\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \sqrt {-\frac {b}{a}} \log \left (\frac {{\left (a^{2} + 6 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} - 2 \, {\left (3 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{2} - 4 \, {\left ({\left (a^{2} + a b\right )} \cos \left (d x + c\right )^{3} - a b \cos \left (d x + c\right )\right )} \sqrt {-\frac {b}{a}} \sin \left (d x + c\right ) + b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{4} + 2 \, {\left (a b - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}}\right )}{4 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} d}, \frac {{\left (a - 3 \, b\right )} d x + {\left (a - b\right )} \cos \left (d x + c\right ) \sin \left (d x + c\right ) - b \sqrt {\frac {b}{a}} \arctan \left (\frac {{\left ({\left (a + b\right )} \cos \left (d x + c\right )^{2} - b\right )} \sqrt {\frac {b}{a}}}{2 \, b \cos \left (d x + c\right ) \sin \left (d x + c\right )}\right )}{2 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} d}\right ] \]
[In]
[Out]
Timed out. \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\text {Timed out} \]
[In]
[Out]
none
Time = 0.30 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.14 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {\frac {2 \, b^{2} \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {a b}} + \frac {{\left (d x + c\right )} {\left (a - 3 \, b\right )}}{a^{2} - 2 \, a b + b^{2}} + \frac {\tan \left (d x + c\right )}{{\left (a - b\right )} \tan \left (d x + c\right )^{2} + a - b}}{2 \, d} \]
[In]
[Out]
none
Time = 0.50 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.33 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=\frac {\frac {2 \, {\left (\pi \left \lfloor \frac {d x + c}{\pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (d x + c\right )}{\sqrt {a b}}\right )\right )} b^{2}}{{\left (a^{2} - 2 \, a b + b^{2}\right )} \sqrt {a b}} + \frac {{\left (d x + c\right )} {\left (a - 3 \, b\right )}}{a^{2} - 2 \, a b + b^{2}} + \frac {\tan \left (d x + c\right )}{{\left (\tan \left (d x + c\right )^{2} + 1\right )} {\left (a - b\right )}}}{2 \, d} \]
[In]
[Out]
Time = 13.92 (sec) , antiderivative size = 254, normalized size of antiderivative = 3.06 \[ \int \frac {\cos ^2(c+d x)}{a+b \tan ^2(c+d x)} \, dx=-\frac {6\,a\,b\,\mathrm {atan}\left (\frac {\sin \left (c+d\,x\right )}{\cos \left (c+d\,x\right )}\right )-a^2\,\sin \left (2\,c+2\,d\,x\right )-2\,a^2\,\mathrm {atan}\left (\frac {\sin \left (c+d\,x\right )}{\cos \left (c+d\,x\right )}\right )+a\,b\,\sin \left (2\,c+2\,d\,x\right )+\mathrm {atan}\left (\frac {a^2\,b^3\,\sin \left (c+d\,x\right )\,\sqrt {-a\,b^3}\,9{}\mathrm {i}-a^3\,b^2\,\sin \left (c+d\,x\right )\,\sqrt {-a\,b^3}\,6{}\mathrm {i}-a\,b^4\,\sin \left (c+d\,x\right )\,\sqrt {-a\,b^3}\,4{}\mathrm {i}+a^4\,b\,\sin \left (c+d\,x\right )\,\sqrt {-a\,b^3}\,1{}\mathrm {i}}{-\cos \left (c+d\,x\right )\,a^5\,b^2+6\,\cos \left (c+d\,x\right )\,a^4\,b^3-9\,\cos \left (c+d\,x\right )\,a^3\,b^4+4\,\cos \left (c+d\,x\right )\,a^2\,b^5}\right )\,\sqrt {-a\,b^3}\,4{}\mathrm {i}}{4\,d\,a^3-8\,d\,a^2\,b+4\,d\,a\,b^2} \]
[In]
[Out]